from ai_assistant import AIAssistant

class TextGenerationAssistant(AIAssistant):
    def __init__(self, id, name, version, is_online, ability_score, supported_text_types):
        super().__init__(id, name, "文本生成", version, is_online, ability_score)
        self.supported_text_types = supported_text_types
    
    def execute_task(self, task_content):
        return f"[{self.get_name()}] 执行文本生成任务：\n任务内容：{task_content}\n生成结果：已完成文本创作（支持类型：{self.supported_text_types}）"
    
    # Getter and setter for supported_text_types
    def get_supported_text_types(self):
        return self.supported_text_types
    
    def set_supported_text_types(self, supported_text_types):
        self.supported_text_types = supported_text_types
    
    def __str__(self):
        return super().__str__() + f", 支持数据类型:{self.supported_text_types}"